package com.zzyl.nursing.controller;


import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.DeviceData;
import com.zzyl.nursing.dto.DeviceDataPageReqDto;
import com.zzyl.nursing.service.IDeviceDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/nursing/data")
public class DeviceDataController extends BaseController {
    @Autowired
    private IDeviceDataService deviceDataService;

    @GetMapping("/list")
    public TableDataInfo list(DeviceDataPageReqDto deviceDataPageReqDto){
        startPage();
        List<DeviceData> list = deviceDataService.listdata(deviceDataPageReqDto);
        return getDataTable(list);
    }
}
